import axiosInstance from "./axiosInstance";
const baseUrl = "/user";

export const getList = (params) => {
	return axiosInstance.get(`${baseUrl}/list`, { params });
};

export const deleteuser = (id) => {
	return axiosInstance.delete(`${baseUrl}/${id}`);
}

export const edituser = (data) => {
	return axiosInstance.put(`${baseUrl}`, data);
}
export const adduser = (data) => {
	return axiosInstance.post(`${baseUrl}`, data);
}

// 获取当前登录用户信息
export const getCurrentUser = () => {
	return axiosInstance.get(`${baseUrl}/current`);
}
